 //********************************************************
 // Magazine.java                   Author:20172323wyh
 //
 // 定义一个magazine子类继承父类的方法。
 //********************************************************

 public class Magazine extends ReadingMaterial
 {
    private String category;
 
    public Magazine(String names, String words, int numPages, String c)
    {
        super(names, words, numPages);

        category = c;
    }

    public String toString()
    {
        return name + "\n" + Keyword + "\n" + pages + "\n" + category;
    }
 }
